<template>
  <div>
    <button @click="time = '2022-10-10'">修改时间</button>
    <h2>我是父盒子</h2>
    <p>{{ time }}</p>
    <p>{{ obj }}</p>
    <son :date="time" :obj="obj" @changeTime="time = $event"></son>
  </div>
</template>

<script>
import son from "./components/son.vue";
export default {
  components: { son },
  data() {
    return {
      time: "2022-8-18",
      obj: { name: "Guo", age: 23 },
    };
  },
};
</script>

<style>
body {
  height: 100vh;
  background: linear-gradient(to bottom, pink, skyblue);
}
</style>